package com.xqboss.apps.dto.synthesis;

import com.xqboss.apps.enums.synthesis.SynthesisEditEnum;
import com.xqboss.apps.enums.synthesis.SynthesisNumChangeDirectionEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author Administrator
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "合成活动")
public class WebSynthesisEditDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "活动id")
    @NotNull(message = "活动id不可为空")
    private Long id;

    @ApiModelProperty(value = "库存变动方向", required = true)
    private SynthesisNumChangeDirectionEnum direction;

    @NotNull(message = "修改类型不可为空")
    private SynthesisEditEnum editType;

    @ApiModelProperty(value = "数量")
    @Min(value = 1, message = "修改数量不合法")
    private Integer num;

    @ApiModelProperty(value = "规则-状态[1:展示;2:停止;3:隐藏]")
    private Integer status;

    @ApiModelProperty("关联id")
    @Min(value = 1, message = "关联id不合法")
    private Long thirdId;
}
